package com.glory.erp.auth.menu.bean;

import java.util.Set;

import com.glory.erp.auth.role.bean.Role;

/**
 * @Description: 菜单
 * @Title: Menu.java
 * @Author: 樊双峰
 * @Date: 2018年5月24日 下午10:11:13
 * @Version V1.0
 */
public class Menu {

	public static final Long MENU_SYSTEM_MENU__UUID = 1L;
	
	/**
	 * id
	 */
	private Long uuid;
	
	/**
	 * 菜单名
	 */
	private String name;
	
	/**
	 * 菜单路径
	 */
	private String url;
	
	/**
	 * 自连接 多对一
	 */
	private Menu parent;
	
	/**
	 * 自连接 一对多
	 */
	private Set<Menu> children;
	
	/**
	 * 对角色 多对多
	 */
	private Set<Role> roles;
	
	public Menu() {
	}

	public Menu(Long uuid, String name, String url) {
		this.uuid = uuid;
		this.name = name;
		this.url = url;
	}

	public Menu(Long uuid, String name, String url, Menu parent,
			Set<Menu> children) {
		this.uuid = uuid;
		this.name = name;
		this.url = url;
		this.parent = parent;
		this.children = children;
	}

	public Long getUuid() {
		return uuid;
	}

	public void setUuid(Long uuid) {
		this.uuid = uuid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Menu getParent() {
		return parent;
	}

	public void setParent(Menu parent) {
		this.parent = parent;
	}

	public Set<Menu> getChildren() {
		return children;
	}

	public void setChildren(Set<Menu> children) {
		this.children = children;
	}

	public Set<Role> getRoles() {
		return roles;
	}

	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}
}